package com.isorf.mapper;

import com.isorf.pojo.ShoeType;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface ShoeTypeMapper {
    @Insert("insert into shoe_type(type_name, type_status, type_remark) values(#{typeName}, #{typeStatus}, #{typeRemark})")
    int addShoeType(ShoeType shoeType);

    @Delete("delete from shoe_type where type_id = #{typeId}")
    int deleteShoeType(int typeId);

    @Update("update shoe_type set type_name = #{typeName}, type_status = #{typeStatus}, type_remark = #{typeRemark} where type_id = #{typeId}")
    int updateShoeType(ShoeType shoeType);

    @Select("select * from shoe_type where type_id = #{typeId}")
    ShoeType getShoeTypeById(int typeId);

    @Select("select * from shoe_type")
    List<ShoeType> getAllShoeTypes();
} 